let _tidPrevious = 0

export function timeId() {
  let t = Date.now()
  const randomNum = ~~((1 + Math.random()) * 65536)

  if(t <= _tidPrevious) {
    t = ++_tidPrevious
  } else {
    _tidPrevious = t
  }
  return (+(randomNum.toString() + t)).toString(36)
}
